<?php
/**
 * @Author: Marte
 * @Date:   2017-08-22 08:02:19
 * @Last Modified by:   Marte
 * @Last Modified time: 2017-08-22 08:03:07
 */
require '../data/config_connect.php';
$_sql='select flower from book_section where id="'.$_GET['id'].'"';
$_result=$_mysql->query($_sql);
$_assoc=$_result->fetch_assoc();
$num=$_assoc['flower'];
$num=$num+1;
$sqll='update book_section set flower="'.$num.'" where id="'.$_GET['id'].'" ';
if($_mysql->query($sqll))
{
    echo "<script>alert('送花成功！');window.history.back();</script>";
}
else{
    echo "<script>alert('送花失败！');window.history.back();</script>";
}
?>